package org.dev.hi.hiui.tab.bottom;

import android.graphics.Bitmap;

import androidx.fragment.app.Fragment;

public
/**
 * Author WenPing 
 * CreateTime 2021/3/7.
 * Description:
 */

class HiTabBottomInfo<Color> {

    public enum TabType{
        BITMAP,ICON
    }

    //tab对应的fragment
    public Class<?extends Fragment> fragment;
    public String name;
    public Bitmap defaultBitmap;
    public Bitmap selectedBitmap;
    public String iconFont;

    public String defaultIconName;
    public String selectedIconName;
    public Color defaultColor;
    public Color tintColor;
    public TabType tabType;

    /**
     * 用bitmap显示tab
     * @param name
     * @param defaultBitmap
     * @param selectedBitmap
     */
    public HiTabBottomInfo(String name, Bitmap defaultBitmap, Bitmap selectedBitmap) {
        this.name = name;
        this.defaultBitmap = defaultBitmap;
        this.selectedBitmap = selectedBitmap;
        this.tabType = TabType.BITMAP;
    }

    /**
     * 用Color来显示tab
     * @param name
     * @param iconFont
     * @param defaultIconName
     * @param selectedIconName
     * @param defaultColor
     * @param tintColor
     */
    public HiTabBottomInfo(String name, String iconFont, String defaultIconName, String selectedIconName, Color defaultColor, Color tintColor) {
        this.name = name;
        this.iconFont = iconFont;
        this.defaultIconName = defaultIconName;
        this.selectedIconName = selectedIconName;
        this.defaultColor = defaultColor;
        this.tintColor = tintColor;
        this.tabType = TabType.ICON;
    }

}
